import request from '@/router/axios';

export const getWorkOrderInfo = (params) => {
    return request({
        url: '/api/mes-abacus/production-trace/trace-work-order-info',
        method: 'get',
        params: params
    });
};

export const getDeliveryInfo = (current, size, params) => {
    return request({
        url: '/api/mes-abacus/production-trace/page-query/trace-delivery',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    });
};

export const getRepairInfoBySn = (params) => {
    return request({
        url: '/api/mes-product/productiontrace/object-list',
        method: 'get',
        params: params
    });
};

export const getAssociationInfo = (current, size, params) => {
    return request({
        url: '/api/mes-abacus/production-trace/forward-trace/relates-info',
        method: 'get',
        params: params
    });
};

export const getOverStationInfoBySn = (current, size, params) => {
    return request({
        url: '/api/mes-abacus/production-trace/page-query-sn-trace-over-station-info',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    });
};

export const getOverStationInfoByWorkOrderNo = (current, size, params) => {
    return request({
        url: '/api/mes-abacus/production-trace/page-query/forward-trace-work-order-over-station-info',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    });
};

export const getAccessoryInfo = (current, size, params) => {
    return request({
        url: '/api/mes-abacus/production-trace/page-query-forward-trace-indirect',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    });
};

export const getEquipmentInfo = (current, size, params) => {
    return request({
        url: '/api/mes-abacus/production-trace/page-query-forward-trace-equipment',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    });
};

export const getInspectionInfo = (current, size, params) => {
    return request({
        url: '/api/mes-abacus/production-trace/page-query-forward-trace-inspection',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    });
};

export const getMachineTestInfo = (params) => {
    return request({
        url: '/api/mes-product/machine-test-data/machine-test-date/info',
        method: 'get',
        params: params
    });
};

export const getRepairInfoByWorkOrderNo = (current, size, params) => {
    return request({
        url: '/api/mes-abacus/production-trace/page-query-forward/work-order-no-trace-repair-info',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    });
};

export const getWarehouseUsePart = (current, size, params) => {
    return request({
        url: '/api/mes-abacus/production-trace/page-query-forward/trace-warehouse-issue-material',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    });
};

export const getAssemblyKeyMaterials = (current, size, params) => {
    return request({
        url: '/api/mes-abacus/production-trace/page-query-forward/trace-assemble-key-material',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    });
};

export const getSMTUseMaterials = (current, size, params) => {
    return request({
        url: '/api/mes-abacus/production-trace/page-query-forward/trace-smt-material-usage',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    });
};

export const getDipUseMaterials = (current, size, params) => {
    return request({
        url: '/api/mes-abacus/production-trace/page-query-forward/trace-dip-material-usage',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    });
};